package com.j2eefast.bussiness.contract.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.j2eefast.bussiness.contract.entity.BusRepairEntity;
import com.j2eefast.bussiness.contract.entity.BusWarehouseEntity;
import com.j2eefast.framework.sys.entity.SysUserEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>借出归还</p>
 *
 * @author: summer
 * @date: 2021-06-09 10:41
 * @web: http://www.letukeji.cn
 * @version: 1.0.1
 */
public interface BusWarehouseMapper extends BaseMapper<BusWarehouseEntity> {

    boolean updateRepair(@Param("recordList") List<BusWarehouseEntity> recordList);

    boolean saveRepair(@Param("recordList") List<BusWarehouseEntity> recordList);

    List<BusWarehouseEntity> repairList(@Param("id") int id);
    BusWarehouseEntity repairInfo(@Param("id") int id);

    public boolean deleteByIds(@Param("ids") Long[] ids);
    public boolean updateCheck(@Param("id") Long id, @Param("userId") Long userId);
    //查询用户信息
    public SysUserEntity getSysById(@Param("userId") Long userId);

    /**
     * 页面查询流程实例分页
     * @return
     */
    Page<BusWarehouseEntity> findPage(IPage<?> params,
                                      @Param("equipmentCode") String equipmentCode,
                                      @Param("equipmentCode2") String equipmentCode2,
                                      @Param("equipmentName") String equipmentName,
                                      @Param("equipmentName2") String equipmentName2,
                                      @Param("equipmentModel") String equipmentModel,
                                      @Param("meteringUnit") String meteringUnit,
                                      @Param("borrowDepartment") String borrowDepartment,
                                      @Param("borrower") String borrower,
                                      @Param("registrant") String registrant,
                                      @Param("returnee") String returnee,
                                      @Param("checks") String checks,
                                      @Param("remark") String remark,
                                      @Param("beginTime") String startTime,
                                      @Param("endTime") String endTime,
                                      @Param("beginTime2") String startTime2,
                                      @Param("endTime2") String endTime2);


    List<BusWarehouseEntity> findList(IPage<?> params,
                                      @Param("borrower") String borrower,
                                      @Param("borrowDepartment") String borrowDepartment,
                                      @Param("equipmentCode") String equipmentCode,
                                      @Param("equipmentName") String equipmentName,
                                      @Param("startTime") String startTime,
                                      @Param("endTime") String endTime,
                                      @Param("equipmentModel") String equipmentModel);

    BusWarehouseEntity getbusWarehouseInfo(@Param("equipmentCode") String equipmentCode);
}
